set(OpenSSL_ROOT "${CPUNCHLINE_PRE_BUILT_DIR}")
list(APPEND CMAKE_PREFIX_PATH "${CPUNCHLINE_PRE_BUILT_DIR}")
find_package(OpenSSL REQUIRED)

set(OPENSSL_STUDY openssl_study)

add_executable(${OPENSSL_STUDY}
    src/openssl_study.c
)
target_include_directories(${OPENSSL_STUDY} PRIVATE inc)
target_link_libraries(${OPENSSL_STUDY} PRIVATE OpenSSL::Crypto OpenSSL::SSL)
target_compile_definitions(${OPENSSL_STUDY} PRIVATE -DOPENSSL_CONF_ABSPATH="${CPUNCHLINE_PRE_BUILT_DIR}/lib/ssl/openssl.cnf")
install(TARGETS ${OPENSSL_STUDY} DESTINATION bin)
